<template>
  <div>
    <h1>父组件</h1>
    <Child 
      :msg="'父组件传递给子组件的msg属性'" 
      :money="rmb"
      @childEvent="handleChildEvent">
    </Child>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import Child from './Child.vue'

let rmb = ref(100)

// 处理子组件发出的事件
const handleChildEvent = (data: string) => {
  console.log('接收到子组件数据:', data)
}
</script>

<style scoped>
</style>